package com.vehicle.service.Impl;

import com.vehicle.domains.entity.VehicleCommonLedgerEntity;
import com.vehicle.mapper.VehicleCommonLedgerMapper;
import com.vehicle.service.VehicleCommonLedgerService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

@Service
public class VehicleCommonLedgerServiceImpl implements VehicleCommonLedgerService {
    @Resource
    private VehicleCommonLedgerMapper vehicleCommonLedgerMapper;
    @Override
    public void insert(VehicleCommonLedgerEntity vehicleCommonLedgerEntity) {
        vehicleCommonLedgerMapper.insertVehicleLedger(vehicleCommonLedgerEntity);
    }

    @Override
    public void updateAssId(Long id, Long assId) {
        vehicleCommonLedgerMapper.updateAssId(id, assId);
    }

    @Override
    public VehicleCommonLedgerEntity getLastLedgerByVehicleNumber(String vehicleNumber) {
        return vehicleCommonLedgerMapper.getLastLedgerByVehicleNumber(vehicleNumber);
    }

    @Override
    public void updateVehicleExitInfo(VehicleCommonLedgerEntity vehicleCommonLedgerEntity) {
        vehicleCommonLedgerMapper.updateVehicleExitInfo(vehicleCommonLedgerEntity);
    }
}
